use std::error::Error;
use std::sync::Arc;
use std::thread;
use async_trait::async_trait;
use futures::SinkExt;
use tokio::runtime::Runtime;
use tokio::sync::{mpsc, Mutex};
use tokio_util::udp::UdpFramed;
use crate::codec::d_codec::PacketBytesCodec;
use crate::start::Connection;
use crate::start::dispatcher::PacketDispatcher;
use crate::start::server::{Message, Shared};
use crate::start::udp::UdpConnection;

use futures::{ StreamExt};
use futures::stream::SplitStream;
use tokio::net::UdpSocket;

#[async_trait]
pub trait Processor{
    type Socket;
    async fn poll(&mut self, socket: Self::Socket, service: Arc<PacketDispatcher>)->Result<(), Box<dyn Error>>;
}



